export function minuteToHour(curTime) {
  if (!curTime) {
    return '00:00';
  }
  let rv = ""
  if (curTime >= 1440) {
    rv = rv + '次日';
    curTime = curTime - 1440;
  }
  let hours = Math.floor(curTime / 60)
  let minutes = curTime % 60;
  return rv + (hours < 10 ? ('0' + hours) : hours) + ':' + (minutes < 10 ? ('0' + minutes) : minutes)
}
export function hourToMinute(hourStr) {
  let rv = 0;
  if (hourStr === '24:00') {
    return 1440;
  }
  if (hourStr.startsWith("次日")) {
    hourStr = hourStr.replace("次日", "");
    rv = 1440;
  }
  if (!/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/.test(hourStr)) {
    console.error("hourToMinute", '错误时间格式')
    return 0;
  }
  let times = hourStr.split(":")
  return rv = rv + Number(times[0]) * 60 + Number(times[1])
}
